package controllers;


import play.mvc.Http.Context;
import play.mvc.Result;
import play.mvc.Security;


public class Seguranca extends Security.Authenticator {
//    private final DAOUsuario dao = (new DAOUsuario());
    @Override
    public String getUsername(Context ctx) {
        return ctx.session().get("login");
    }
   
    @Override
    public Result onUnauthorized(Context ctx) {
        return redirect(routes.Application.index());
    }
   
   
}
